/**
 * 最迟还款日
 */
var repaymentDays = _Z.tb0.zuichkr;

jQuery(document).ready(function(){
	var cDate = new Date().Format("yyyy-MM-dd");
	var eDate = addDate(cDate,30);
	var fn_checkCustomize = window.checkCustomize;
	window.checkCustomize = function(){
		if(fn_checkCustomize()){
			var sDate = jQuery("#"+repaymentDays).val();
			if(!_F.compareDate(sDate,eDate)){
				window.top.Dialog.alert("最迟还款日不能大于"+eDate);
				return false;
			}
			return true;
		}
		return false;
	};
});

function addDate(date,days){ 
    var d=new Date(date); 
    d.setDate(d.getDate()+days); 
    var m=d.getMonth()+1; 
    var mStr = m<10?('0'+m):m;
    return d.getFullYear()+'-'+mStr+'-'+d.getDate(); 
} 